<?php (defined('BASEPATH')) OR exit('No direct script access allowed');

/**
 * @author Anh Nguyen <duyanhnguyen@vccorp.vn>
 * @copyright 2012
 */

class User_model extends CI_Model
{

    public function checkLogin($user, $password)
    {
        $this->db->select('*');
        $this->db->from('user');
        $this->db->where(array(
            'u_acc' =>  $user,
            'u_pwd' =>  $password
        ));
        $rs = $this->db->get();
        $result['num_row'] = $rs->num_rows();
        $result['data'] = $rs->result_array();
        $rs->free_result();
        return $result;
    }

}

?>
